gusucode.com > 耐品图片管理系统 标准版A > 耐品图片管理系统 标准版A/CodeDemo.asp

    <!--#include file="Head.asp"-->
<%
'===============================================================
' 著作权号:中国国家版权局著作权登记号2004SR07385
' 版权所有:深圳市耐品科技开发有限公司 www.naipin.com
' 联系电话:0755-26611119 81234844 81234845
' 联系手机:13316911914
' 联系邮箱:naipin@naipin.com
'===============================================================
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>首页调用演示</title>
<link href="Face/<%=Netout.CssFileName%>.css" rel="stylesheet" type="text/css">
<script language="javascript" src="Inc/menu.js"></script>
<script language="javascript" src="Inc/Pop.js"></script>
</head>
<body> 
<div id=menuDiv style='z-index: 5; visibility: hidden; width: 1px; position: absolute; height: 1px;'></div> 
<%
'//*****************************************************************************//
''@	动网论坛首页调用
''@ 程序适用版本:DVBBS v7.1.0 
''@ 官方论坛地址:http://bbs.dvbbs.net http://www.aspsky.net
''@ 程序作者:	Written by Fssunwin
''@ 更新日期:	2005-04-16
'//*****************************************************************************//
Dim NewsConfigFile,XmlDoc
NewsConfigFile = "Templates/CodeTemplates.config"
DemoMain()

Sub DemoMain()
	Dim BbsUrl,ScriptCode
	Dim Node,NewsCode,Childs
	LoadXml()
	Set NewsCode = XmlDoc.DocumentElement.SelectNodes("NewsCode")
	Childs = NewsCode.Length	'列表数
	%>
	<script language="JavaScript">
	<!--
	function oCopy(obj){ 
		obj.select(); 
		var js=obj.createTextRange(); 
		js.execCommand("Copy");
	}
	//-->
	</script>
	<p></p>
	<BR>
	<%
	For Each Node in NewsCode
	ScriptCode = "<script src="""&Config.SystemUrl&"CodePut.asp?Name="&Node.getAttribute("NewsName")&"""></script>"
	%>
	<table cellpadding="5" cellspacing="1" border="0" class="tableBorder" align="center" style="width:600px;height:250px">
	<tr class="tableHeader"><th height="23">[<%=Node.getAttribute("Intro")%>] 效果演示</th></tr>
	<tr>
	<td height="*" class="tableBack" valign="top">
	<div class="quote">
	调用代码:
	<input name="NewScript" id="<%=Node.getAttribute("NewsName")%>" value="<%=Server.Htmlencode(ScriptCode)%>" size="60">
	<input type="button" value="拷贝调用代码" onClick="oCopy(document.getElementById('<%=Node.getAttribute("NewsName")%>'));">
	</div>
	<font color="gray">以下为查看的调用效果:</font>
	<hr size=1>
	<%=ScriptCode%>
	</td>
	</tr>
	</table>
	<p></p>
	<%
	Next
	Set XmlDoc = Nothing
End Sub

Sub LoadXml()
	NewsConfigFile = Server.MapPath(NewsConfigFile)
	Set XmlDoc = Server.CreateObject("MSXML.DOMDocument")
	XmlDoc.Async = False
	If Not XmlDoc.load(NewsConfigFile) Then
		XmlDoc.loadxml "<?xml version=""1.0"" encoding=""gb2312""?><NewscodeInfo/>"
	End If
End Sub
%>